
#ifndef _RADIX_ENGINE_SCENE_H_
#define _RADIX_ENGINE_SCENE_H_

#include <Engine/Header.h>

_BeginNamespace(Radix)
/*
=================================================================
== Entities
=================================================================
*/
enum EntityType
{
	eEntityType_Dummy,
	eEntityType_Entity,
	eEntityType_Light,
};

class IEntity :public Interface
{
public:
	virtual const String& name() = 0;
	virtual EntityType type() = 0;
};

class IActor :public IEntity
{};

class ILight :public IEntity
{};

class IEntry :public IEntity
{};

class INode :public Interface
{
public:
	virtual const String& name() = 0;
	virtual INode* parent() = 0;
	virtual INode* child(const String& name) = 0;
	virtual INode* createChild(const String& name) = 0;
	virtual void deleteChild(const String& name) = 0;
	virtual void deleteChildren() = 0;

	/*	
	virtual const Vector3& position() = 0;
	virtual void position(const Vector3& pos) = 0;

	virtual const Vector4& orientation() = 0;
	virtual void orientation(const Vector3& axis, real angle) = 0;

	virtual void translate(const Vector3& t) = 0;
	virtual void rotate(const Vector3& axis, real theta) = 0;
	virtual void scale(const Vector3& factor) = 0;
	*/

	virtual IEntity* entity() = 0;
	virtual bool attachEntity(IEntity* entity) = 0;
	virtual void detachEntity() = 0;
};

/*
=================================================================
== Scene
=================================================================
*/
class IScene :public Interface
{
public:
	virtual const String& name() = 0;
	virtual const String& type() = 0;
	virtual IEntity* root() = 0;

	virtual void update(real elapsed) = 0;
};
/*
=================================================================
== SceneSystem
=================================================================
*/
class ISceneSystem :public Interface
{
public:
	virtual IScene* createScene(const String& name, const String& type) = 0;
	virtual IScene* selectScene(const String& name) = 0;
	virtual void deleteScene(const String& name) = 0;
	virtual void deleteScenes() = 0;
	
	virtual IEntity* createEntity(const String& name, const EntityType& type) = 0;
	virtual IEntity* selectEntity(const String& name) = 0;
	virtual void deleteEntity(const String& name) = 0;
	virtual void deleteEntities() = 0;
};

_EndNamespace(Radix)

#endif//_RADIX_ENGINE_SCENE_H_
